<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/admin.css" />
<link rel="stylesheet" type="text/css" href="style/global.css" />
<link rel="stylesheet" type="text/css" href="style/tip.css" />
<title>咨询反馈</title>
</head>
<body>
<div id="wrap">
<div id="public_head"></div>
<div class="m_search">
        <form method='post' action=''>
        	回访状态 <select class="select" id='all_cattype' name="status">
        			<option value='0'>所有状态</option>
        	<?php 
        		$status = ATools::getConfig('app.visitStatus');
        		if(is_array($status) && count($status)>0){
        			foreach ($status as $k=>$v){
        	?>
        		<option <?php if($k==$sta){echo 'selected';}?> value="<?php echo $k?>"><?php echo $v?></option>
        	<?php }}?>
        	</select> 
        	回访结果 <select class="select" name="result">
        		<option value='0' selected>所有结果</option>
        	<?php 
        		$result = ATools::getConfig('app.visitResult');
        		if(is_array($result) && count($result)>0){
        			foreach ($result as $k=>$v){
        	?>
        		<option <?php if($k==$ret){echo 'selected';}?> value="<?php echo $k?>"><?php echo $v?></option>
        	<?php }}?>
        	</select> 
        	患者名称<input class="qi_text" name="name" type="text" value="<?php echo $name;?>"/> 
        	<input class="btn_search" name="sel_sub" type="submit" value="" />
        	<input class="" name="sel_again" type="submit" value="需再次回访" />
        	<input class="" name="sel_fail" type="submit" value="回访失败" />
        	</form>
</div>
<div class='m_content'>
<table class="qi_table" border="0" cellpadding="0" cellspacing="1">
	<tr>
		<th>患者姓名</th>
		<th>科室</th>
		<th>联系电话</th>
		<th>业务系统</th>
		<th>回访小结</th>
		<th>回访人</th>
		<th>回访时间</th>
		<th>回访状态</th>
		<th>回访结果</th>
		<th>操作</th>
	</tr>
     <?php 
     if (count($rows) > 0) {
                     foreach ($rows as $row) {?>
                      <tr>
		<td><?php echo str_replace($name, '<font color="red"><b>'.$name.'</b></font>&nbsp;', $row['PATIENT_NAME'])?></td>
		<td><?php echo $row['CY_DEP']?></td>
		<td><?php echo $row['VISIT_PHONE']?></td>
		<td><?php echo ATools::getConfig('app.visitSystem.'.$row['SYS_ID'])?></td>
		<td><?php echo ATools::msubstr($row['CONTENT'],0,10)?></td>
		<td><?php echo ATools::retUserTrueName($row['USER_NAME'])?></td>
		<td><?php echo $row['VISIT_TIME']?></td>
		<td><?php echo ATools::getVisitStatus($row['VISIT_STATE'])?></td>
		<td>
			<?php echo ATools::getConfig('app.visitResult.'.$row['VISIT_RESULT'])?>
			<?php 
				if(in_array($row['VISIT_STATE'],array('C','G','H','I'))){
					echo "<a target='fmMainContents' href='?c=visitzy&a=entry&pid=".$row['PATIENT_ID']."' onclick=\"javascript:JYCsm.closeWindow();\">再次回访</a>";
				}
			?>
		</td>
		<td>
			<a href="?c=visit&a=edit&id=<?php echo $row['V_ID']?>">编辑</a>&nbsp;&nbsp;
			<a href="?c=visit&a=del&id=<?php echo $row['V_ID']?>" onclick="return T.confirm('确定删除吗？');">删除</a>
		</td>
	</tr>
                      <?php }?>
    <tr>
		<td colspan="10"><div class="pager-his"><?php echo $pager;?></div><div class="clear"></div></td>
	</tr>
    <?php } else {?>
                      <tr height="40"><td style="text-align:center;color:green;" colspan='19'>该用户暂时还没有回访信息</td></tr>
                      <?php }?>
</table>
</div>
</div>
</body>
</html>
<script src="/js/xheditor/jquery/jquery-1.4.4.min.js"
	type="text/javascript"></script>
<script src="/js/boot.js" type="text/javascript"></script>
<script src="/js/tip.js" type="text/javascript"></script>
<script src="/js/add_public_head.js" type="text/javascript"></script>
<script src="/js/comm.js"></script>
<script>
$('input.qf_text[name="key"]').focus(function(){
	if($(this).val()=='请输入用户名、姓名、工号...'){
		$(this).val('')
		$(this).css('color','#000')
	}
})
$('input.qf_text[name="key"]').blur(function(){
	if($(this).val()==''){
		$(this).val('请输入用户名、姓名、工号...')
		$(this).css('color','#999')
	}
})
$('input[type="submit"]').click(function(){
	if($('input.qf_text[name="key"]').val()=='请输入用户名、姓名、工号...'){
		$('input.qf_text[name="key"]').val('')
	}
})
$('.deluser').click(function(){
	if(T.confirm('确定删除吗？')){
		$.ajax({
			url:'/index.php?c=user&a=deluser&id='+$(this).attr('pid'),
			type:'get',
			dataType:'json',
			success:function(de){
				location.reload()
			}
		})
	}
	return false;
})
</script>